import request from '@/utils/request'

//获取案件列表
export function listCase(data) {
  return request({
    url: '/ipms/patent/case/list/',
    headers: {
      isToken: true
    },
    method: 'post',
    data: data
  })
}

//获取案件详情
export function detailCase(params) {
  return request({
    url: '/ipms/patent/case/detail/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//获取案件详情之申请文件
export function detailCaseB(params) {
  return request({
    url: '/ipms/patent/case/detailB/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//获取案件详情之官文信息
export function detailOffical(params) {
  return request({
    url: '/ipms/patent/case/offical/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}
//获取案件详情之著录项信息之发明人信息
export function detailInventor(params) {
  return request({
    url: '/ipms//patent/inventor/find/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}
//获取案件详情之著录项信息之申请人信息
export function detailApplicant(params) {
  return request({
    url: '/ipms//patent/applicant/find/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//立案、案件添加
export function addCase(params) {
  return request({
    url: '/ipms/patent/case/add/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//案件修改
export function updateCase(data) {
  return request({
    url: '/ipms/patent/case/update/',
    headers: {
      isToken: true
    },
    method: 'post',
    data: data
  })
}

//案件删除
export function delCase(params) {
  return request({
    url: '/ipms/patent/case/delete/'+params,
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//撰稿人下拉框
export function getEmployee() {
  return request({
    url: '/ipms/patent/case/getWriter/',
    headers: {
      isToken: true
    },
    method: 'get',
  })
}

//新增申请人
export function addApplicant(data) {
  return request({
    url: '/ipms/patent/applicant/add/',
    headers: {
      isToken: true
    },
    method: 'post',
    data:data,
  })
}

//通过专利id查找申请人
export function findApplicant(page,params) {
  return request({
    url: '/ipms/patent/applicant/find/'+params,
    headers: {
      isToken: true
    },
    params:page,
    method: 'get',
  })
}

//新增--案件历史
export function insertCaseHistory(caseIds,caseHistoryStatusDescrip ) {
  return request({
    url: '/ipms/patent/history/insert/'+caseIds+'/'+caseHistoryStatusDescrip ,
    method: 'get',
  })
}

//查询--案件历史（通过案件编号）
export function caseHistoryList(caseNo) {
  return request({
    url: '/ipms/patent/history/query/'+caseNo,
    method: 'get',
  })
}


//查询--发明人列表
export function findAllInventor(data) {
  return request({
    url: '/ipms/patent/inventor/allInventorList',
    method: 'post',
    data:data,
  })
}

//查询--案件费用
export function caseCost(caseNo) {
  return request({
    url: '/ipms/crm/contract/cost/'+caseNo,
    method: 'get',
  })
}

//模拟官方审核
export function officialreplay() {
  return request({
    url: '/ipms/patent/case/official',
    method: 'get',
  })
}

//撰稿人上传文件--修改专利文件地址
export function updatePatent(data) {
  return request({
    url: '/ipms/patent/updatePatent',
    method: 'post',
    data:data
  })
}






